<!DOCTYPE html>


  <html class="light page-post">


<head>
  <meta charset="utf-8">
  
  <title>Gitbook使用笔记 | 东窗随笔</title>

  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  
    <meta name="keywords" content="工具,gitbook,markdown," />
  

  <meta name="description" content="&amp;#x4F7F;&amp;#x7528;Gitbook &amp;#x5168;&amp;#x7A0B;&amp;#x8BB0;&amp;#x5F55;">
<meta property="og:type" content="article">
<meta property="og:title" content="Gitbook使用笔记">
<meta property="og:url" content="http://hanlyjiang.github.io/2016/08/19/gitbook使用笔记/index.html">
<meta property="og:site_name" content="东窗随笔">
<meta property="og:description" content="&amp;#x4F7F;&amp;#x7528;Gitbook &amp;#x5168;&amp;#x7A0B;&amp;#x8BB0;&amp;#x5F55;">
<meta property="og:updated_time" content="2016-12-08T10:13:52.796Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Gitbook使用笔记">
<meta name="twitter:description" content="&amp;#x4F7F;&amp;#x7528;Gitbook &amp;#x5168;&amp;#x7A0B;&amp;#x8BB0;&amp;#x5F55;">

  

  
    <link rel="icon" href="/favicon.ico">
  

  <link href="/css/styles.css?v=d671a41f" rel="stylesheet">


  
    <link rel="stylesheet" href="/css/personal-style.css">
  

  

  
  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?57e94d016e201fba3603a8a2b0263af0";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>



  
    <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
  

  
    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.3.0/css/font-awesome.min.css">
  
</head>

<body>


  
    <span id="toolbox-mobile" class="toolbox-mobile">观乎</span>
  

  <div class="post-header CENTER">
   
  <div class="toolbox">
    <a class="toolbox-entry" href="/">
      <span class="toolbox-entry-text">观乎</span>
      <i class="icon-angle-down"></i>
      <i class="icon-home"></i>
    </a>
    <ul class="list-toolbox">
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/archives/"
            rel="noopener noreferrer"
            target="_self"
            >
            博客
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/category/"
            rel="noopener noreferrer"
            target="_self"
            >
            分类
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/tag/"
            rel="noopener noreferrer"
            target="_self"
            >
            标签
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/about/"
            rel="noopener noreferrer"
            target="_self"
            >
            关于
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/atom.xml"
            rel="noopener noreferrer"
            target="_blank"
            >
            RSS
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/search/"
            rel="noopener noreferrer"
            target="_self"
            >
            搜索
          </a>
        </li>
      
    </ul>
  </div>


</div>


  <div id="toc" class="toc-article">
    <strong class="toc-title">文章目录</strong>
    <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-安装"><span class="toc-text">1. 安装</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-使用"><span class="toc-text">2. 使用</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#21-命令行基本命令使用"><span class="toc-text">2.1 命令行基本命令使用</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#22-了解目录结构"><span class="toc-text">2.2 了解目录结构</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#23-了解bookjson-配置方法"><span class="toc-text">2.3 了解book.json 配置方法</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-插件安装与配置"><span class="toc-text">3. 插件安装与配置</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#31-代码高亮"><span class="toc-text">3.1 代码高亮</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#1-prism插件"><span class="toc-text">1) prism插件</span></a></li></ol></li><li class="toc-item toc-level-4"><a class="toc-link" href="#32-toctable-of-content"><span class="toc-text">3.2 TOC(Table of Content)</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#1-页面内-navigator"><span class="toc-text">1) 页面内 -  navigator</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#2-侧边-simple-page-toc"><span class="toc-text">2) 侧边 -  simple-page-toc</span></a></li></ol></li><li class="toc-item toc-level-4"><a class="toc-link" href="#34-目前的配置大集合"><span class="toc-text">3.4 目前的配置大集合</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-使用文档编辑器"><span class="toc-text">4. 使用文档编辑器</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#gitbookeditor"><span class="toc-text">GitbookEditor</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#sublime-text"><span class="toc-text">Sublime Text</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-编辑markdown语法"><span class="toc-text">5. 编辑(Markdown语法)</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-生成pdf-文件"><span class="toc-text">6. 生成Pdf 文件</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#参考"><span class="toc-text">参考</span></a></li></ol>
  </div>



<div class="content content-post CENTER">
   <article id="post-gitbook使用笔记" class="article article-type-post" itemprop="blogPost">
  <header class="article-header">
    <h1 class="post-title">Gitbook使用笔记</h1>

    <div class="article-meta">
      <span>
        <i class="icon-calendar"></i>
        <span>2016.08.19</span>
      </span>

      
        <span class="article-author">
          <i class="icon-user"></i>
          <span>hanlyjiang@outlook.com</span>
        </span>
      

      
  <span class="article-category">
    <i class="icon-list"></i>
    <a class="article-category-link" href="/categories/杂项记录/">杂项记录</a> / <a class="article-category-link" href="/categories/杂项记录/工具配置/">工具配置</a>
  </span>



      
        <span>
          <i class="icon-comment"></i>
          <a href="http://hanlyjiang.site/2016/08/19/gitbook使用笔记/#disqus_thread"></a>
        </span>
      

      
      <i class="fa fa-eye"></i> 
        <span id="busuanzi_container_page_pv">
           &nbsp热度 <span id="busuanzi_value_page_pv">
           <i class="fa fa-spinner fa-spin"></i></span>℃
        </span>
      

      
      
    </div>
  </header>

  <div class="article-content">
    
      <p>&#x4F7F;&#x7528;Gitbook &#x5168;&#x7A0B;&#x8BB0;&#x5F55;<br><a id="more"></a><br>Content:</p>
<!-- toc -->
<ul>
<li><a href="#1-&#x5B89;&#x88C5;">1. &#x5B89;&#x88C5;</a></li>
<li><a href="#2-&#x4F7F;&#x7528;">2. &#x4F7F;&#x7528;</a></li>
<li><a href="#3-&#x63D2;&#x4EF6;&#x5B89;&#x88C5;&#x4E0E;&#x914D;&#x7F6E;">3. &#x63D2;&#x4EF6;&#x5B89;&#x88C5;&#x4E0E;&#x914D;&#x7F6E;</a></li>
<li><a href="#4-&#x4F7F;&#x7528;&#x6587;&#x6863;&#x7F16;&#x8F91;&#x5668;">4. &#x4F7F;&#x7528;&#x6587;&#x6863;&#x7F16;&#x8F91;&#x5668;</a></li>
<li><a href="#5-&#x7F16;&#x8F91;markdown&#x8BED;&#x6CD5;">5. &#x7F16;&#x8F91;(Markdown&#x8BED;&#x6CD5;)</a></li>
<li><a href="#6-&#x751F;&#x6210;pdf-&#x6587;&#x4EF6;">6. &#x751F;&#x6210;Pdf &#x6587;&#x4EF6;</a></li>
<li><a href="#&#x53C2;&#x8003;">&#x53C2;&#x8003;</a></li>
</ul>
<!-- tocstop -->
<h3 id="1-&#x5B89;&#x88C5;"><a href="#1-&#x5B89;&#x88C5;" class="headerlink" title="1. &#x5B89;&#x88C5;"></a>1. &#x5B89;&#x88C5;</h3><ul>
<li>1.1 &#x5B89;&#x88C5;<a href="https://nodejs.org/zh-cn/" target="_blank" rel="external">NodeJs</a>    </li>
<li>1.2 Gitbook &#x547D;&#x4EE4;&#x884C;&#x5DE5;&#x5177;&#x5B89;&#x88C5;    ,&#x8BE6;&#x60C5;&#x53C2;&#x8003; &gt;<a href="http://toolchain.gitbook.com/setup.html" target="_blank" rel="external">gitbook &#x5B89;&#x88C5;&#x914D;&#x7F6E;&#x5B98;&#x65B9;&#x6587;&#x6863;</a><br><code>npm install gitbook-cli -g</code>    </li>
</ul>
<p><br></p>
<h3 id="2-&#x4F7F;&#x7528;"><a href="#2-&#x4F7F;&#x7528;" class="headerlink" title="2. &#x4F7F;&#x7528;"></a>2. &#x4F7F;&#x7528;</h3><p>&#x4E86;&#x89E3;&#x4E0B;&#x9762;&#x51E0;&#x70B9;&#xFF0C;&#x57FA;&#x672C;&#x5C31;&#x53EF;&#x4EE5;&#x6109;&#x5FEB;&#x7684;&#x5728;&#x672C;&#x5730;&#x5199;&#x4E66;&#x4E86;    </p>
<h4 id="21-&#x547D;&#x4EE4;&#x884C;&#x57FA;&#x672C;&#x547D;&#x4EE4;&#x4F7F;&#x7528;"><a href="#2-1-&#x547D;&#x4EE4;&#x884C;&#x57FA;&#x672C;&#x547D;&#x4EE4;&#x4F7F;&#x7528;" class="headerlink" title="2.1 &#x547D;&#x4EE4;&#x884C;&#x57FA;&#x672C;&#x547D;&#x4EE4;&#x4F7F;&#x7528;"></a>2.1 &#x547D;&#x4EE4;&#x884C;&#x57FA;&#x672C;&#x547D;&#x4EE4;&#x4F7F;&#x7528;</h4><ul>
<li>&#x65B0;&#x5EFA;&#x4E66;&#x7C4D;&#xFF0C;&#x5728;&#x76EE;&#x5F55;&#x4E2D;&#x6267;&#x884C;&#xFF1A;<br><code>gitbook init</code>    </li>
<li>&#x6784;&#x5EFA;&#x9884;&#x89C8;html&#x6587;&#x4EF6;<br><code>gitbook build</code>    </li>
<li>&#x5F00;&#x542F;&#x670D;&#x52A1;&#x5728;&#x6D4F;&#x89C8;&#x5176;&#x4E2D;&#x9884;&#x89C8;<br><code>gitbook serve</code>    </li>
</ul>
<blockquote>
<p>&#x4F20;&#x9001;&#x95E8;:<br>&#x5B89;&#x88C5;&#x4F7F;&#x7528;&#xFF1A;<a href="http://toolchain.gitbook.com/setup.html" target="_blank" rel="external">Setup and Installation of GitBook</a>      </p>
</blockquote>
<ul>
<li>&#x7F16;&#x8F91;&#x540E;&#x63D0;&#x4EA4;&#x5230;Git&#x5E93;&#xFF1A;<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">git add .    </div><div class="line">git commit -m &quot;&#x63D0;&#x4EA4;&#x5907;&#x6CE8;&quot;</div></pre></td></tr></table></figure>
</li>
</ul>
<h4 id="22-&#x4E86;&#x89E3;&#x76EE;&#x5F55;&#x7ED3;&#x6784;"><a href="#2-2-&#x4E86;&#x89E3;&#x76EE;&#x5F55;&#x7ED3;&#x6784;" class="headerlink" title="2.2 &#x4E86;&#x89E3;&#x76EE;&#x5F55;&#x7ED3;&#x6784;"></a>2.2 &#x4E86;&#x89E3;&#x76EE;&#x5F55;&#x7ED3;&#x6784;</h4><p>&#x4E0D;&#x7D2F;&#x8FF0;&#xFF0C;&#x76F4;&#x63A5;&#x4F20;&#x9001;&#x5B98;&#x65B9;&#x8BF4;&#x660E;:</p>
<blockquote>
<p>&#x4F20;&#x9001;&#x95E8;&#xFF1A;<br><a href="http://toolchain.gitbook.com/structure.html" target="_blank" rel="external">&#x76EE;&#x5F55;&#x7ED3;&#x6784;</a><br><a href="http://toolchain.gitbook.com/pages.html" target="_blank" rel="external">&#x9875;&#x9762;&#x548C;&#x5185;&#x5BB9;&#x76EE;&#x5F55;</a>    </p>
</blockquote>
<h4 id="23-&#x4E86;&#x89E3;bookjson-&#x914D;&#x7F6E;&#x65B9;&#x6CD5;"><a href="#2-3-&#x4E86;&#x89E3;book-json-&#x914D;&#x7F6E;&#x65B9;&#x6CD5;" class="headerlink" title="2.3 &#x4E86;&#x89E3;book.json &#x914D;&#x7F6E;&#x65B9;&#x6CD5;"></a>2.3 &#x4E86;&#x89E3;book.json &#x914D;&#x7F6E;&#x65B9;&#x6CD5;</h4><blockquote>
<p>&#x4F20;&#x9001;&#x95E8;&#xFF1A;<br><a href="http://toolchain.gitbook.com/config.html" target="_blank" rel="external">book.json &#x914D;&#x7F6E;</a><br><br></p>
<h3 id="3-&#x63D2;&#x4EF6;&#x5B89;&#x88C5;&#x4E0E;&#x914D;&#x7F6E;"><a href="#3-&#x63D2;&#x4EF6;&#x5B89;&#x88C5;&#x4E0E;&#x914D;&#x7F6E;" class="headerlink" title="3. &#x63D2;&#x4EF6;&#x5B89;&#x88C5;&#x4E0E;&#x914D;&#x7F6E;"></a>3. &#x63D2;&#x4EF6;&#x5B89;&#x88C5;&#x4E0E;&#x914D;&#x7F6E;</h3><p>&#x63D2;&#x4EF6;&#x641C;&#x7D22;&#x6D4F;&#x89C8;: <a href="https://plugins.gitbook.com/browse" target="_blank" rel="external">GitBook Plugins</a></p>
<h4 id="31-&#x4EE3;&#x7801;&#x9AD8;&#x4EAE;"><a href="#3-1-&#x4EE3;&#x7801;&#x9AD8;&#x4EAE;" class="headerlink" title="3.1 &#x4EE3;&#x7801;&#x9AD8;&#x4EAE;"></a>3.1 &#x4EE3;&#x7801;&#x9AD8;&#x4EAE;</h4></blockquote>
<h5 id="1-prism&#x63D2;&#x4EF6;"><a href="#1-prism&#x63D2;&#x4EF6;" class="headerlink" title="1) prism&#x63D2;&#x4EF6;"></a>1) <a href="https://plugins.gitbook.com/plugin/prism" target="_blank" rel="external">prism&#x63D2;&#x4EF6;</a></h5><p>&#x70B9;&#x51FB;&#x4E0A;&#x65B9;&#x94FE;&#x63A5;&#x67E5;&#x770B;&#x5982;&#x4F55;&#x914D;&#x7F6E;(&#x4E0B;&#x540C;)</p>
<h4 id="32-toctable-of-content"><a href="#3-2-TOC-Table-of-Content" class="headerlink" title="3.2 TOC(Table of Content)"></a>3.2 TOC(Table of Content)</h4><h5 id="1-&#x9875;&#x9762;&#x5185;-navigator"><a href="#1-&#x9875;&#x9762;&#x5185;-navigator" class="headerlink" title="1) &#x9875;&#x9762;&#x5185; -  navigator"></a>1) &#x9875;&#x9762;&#x5185; - <a href="https://plugins.gitbook.com/plugin/navigator" target="_blank" rel="external"> navigator</a></h5><p>&#x5728;&#x6807;&#x9898;&#x4E0B;&#x65B9;&#x663E;&#x793A;&#x76EE;&#x5F55;    </p>
<h5 id="2-&#x4FA7;&#x8FB9;-simple-page-toc"><a href="#2-&#x4FA7;&#x8FB9;-simple-page-toc" class="headerlink" title="2) &#x4FA7;&#x8FB9; -  simple-page-toc"></a>2) &#x4FA7;&#x8FB9; - <a href="https://plugins.gitbook.com/plugin/simple-page-toc" target="_blank" rel="external"> simple-page-toc</a></h5><ul>
<li>&#x5728;&#x53F3;&#x4E0A;&#x65B9;&#x663E;&#x793A;&#x4E00;&#x4E2A;TOC &#x6309;&#x94AE;&#xFF0C;&#x70B9;&#x51FB;&#x540E;&#x663E;&#x793A;&#x76EE;&#x5F55;    </li>
<li>&#x5728;&#x53F3;&#x4E0A;&#x65B9;&#x663E;&#x793A;&#x4E00;&#x4E2A;Top &#x6309;&#x94AE;&#xFF0C;&#x70B9;&#x51FB;&#x540E;&#x56DE;&#x5230;&#x6587;&#x7AE0;&#x9876;&#x90E8;    </li>
</ul>
<p><br></p>
<h4 id="34-&#x76EE;&#x524D;&#x7684;&#x914D;&#x7F6E;&#x5927;&#x96C6;&#x5408;"><a href="#3-4-&#x76EE;&#x524D;&#x7684;&#x914D;&#x7F6E;&#x5927;&#x96C6;&#x5408;" class="headerlink" title="3.4 &#x76EE;&#x524D;&#x7684;&#x914D;&#x7F6E;&#x5927;&#x96C6;&#x5408;"></a>3.4 &#x76EE;&#x524D;&#x7684;&#x914D;&#x7F6E;&#x5927;&#x96C6;&#x5408;</h4><figure class="highlight json"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div></pre></td><td class="code"><pre><div class="line">{</div><div class="line">    <span class="attr">&quot;title&quot;</span>: <span class="string">&quot;&#x9879;&#x76EE;&#x6587;&#x6863;&#x8BB0;&#x5F55;&quot;</span>,</div><div class="line">    <span class="attr">&quot;description&quot;</span>: <span class="string">&quot;&#x9879;&#x76EE;&#x6587;&#x6863;&#x8BB0;&#x5F55;&quot;</span>,</div><div class="line">    <span class="attr">&quot;language&quot;</span>: <span class="string">&quot;zh&quot;</span>,</div><div class="line">    <span class="attr">&quot;plugins&quot;</span>: [</div><div class="line">        <span class="string">&quot;prism&quot;</span>,</div><div class="line">        <span class="string">&quot;-highlight&quot;</span>,</div><div class="line">         <span class="string">&quot;simple-page-toc&quot;</span>,</div><div class="line">         <span class="string">&quot;navigator&quot;</span></div><div class="line">    ],</div><div class="line">    <span class="attr">&quot;pluginsConfig&quot;</span>: {</div><div class="line">        <span class="attr">&quot;simple-page-toc&quot;</span>: {</div><div class="line">            <span class="attr">&quot;maxDepth&quot;</span>: <span class="number">3</span>,</div><div class="line">            <span class="attr">&quot;skipFirstH1&quot;</span>: <span class="literal">true</span></div><div class="line">       }</div><div class="line">    }</div><div class="line">}</div></pre></td></tr></table></figure>
<h3 id="4-&#x4F7F;&#x7528;&#x6587;&#x6863;&#x7F16;&#x8F91;&#x5668;"><a href="#4-&#x4F7F;&#x7528;&#x6587;&#x6863;&#x7F16;&#x8F91;&#x5668;" class="headerlink" title="4. &#x4F7F;&#x7528;&#x6587;&#x6863;&#x7F16;&#x8F91;&#x5668;"></a>4. &#x4F7F;&#x7528;&#x6587;&#x6863;&#x7F16;&#x8F91;&#x5668;</h3><h4 id="gitbookeditor"><a href="#GitbookEditor" class="headerlink" title="GitbookEditor"></a><a href="https://www.gitbook.com/editor/osx" target="_blank" rel="external">GitbookEditor</a></h4><p>GitBook &#x5B98;&#x65B9;&#x51FA;&#x54C1; ,&#x4E0B;&#x8F7D;&#x94FE;&#x63A5; <a href="https://www.gitbook.com/editor/osx" target="_blank" rel="external">GitbookEditor</a>,&#x5982;&#x679C;&#x4E0D;&#x719F;&#x6089;&#x57FA;&#x672C;&#x7684;git&#x547D;&#x4EE4;&#xFF0C;&#x90A3;&#x4E48;&#x6700;&#x597D;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;        </p>
<h4 id="sublime-text"><a href="#Sublime-Text" class="headerlink" title="Sublime Text"></a>Sublime Text</h4><p>&#x53C2;&#x8003;&#xFF1A;<a href="http://hanlyjiang.site/2015/04/26/write-markdown-using-sublimetext-on-windows/" target="_blank" rel="external">Windows&#x4E0A;&#x4F7F;&#x7528;Sublime&#x7F16;&#x8F91;markdown&#x5E76;&#x9884;&#x89C8;</a><br>&#x53E6;&#x5916;&#x63D0;&#x4E0B;Sublime &#x6709;&#x4E2A;<code>Open Folder</code> &#x529F;&#x80FD;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x5DE6;&#x4FA7;&#x663E;&#x793A;&#x76EE;&#x5F55;&#x6811;&#xFF0C;&#x66F4;&#x65B9;&#x4FBF;&#x7684;&#x662F;&#x53EF;&#x4EE5;&#x5728;&#x589E;&#x52A0;&#x6587;&#x4EF6;&#x76EE;&#x5F55;&#xFF0C;&#x91CD;&#x547D;&#x540D;&#x6587;&#x4EF6;&#x76EE;&#x5F55;    </p>
<p>&#x5DE5;&#x4F5C;&#x6D41;&#x7A0B;&#xFF1A;<br>Sublime&#x4E2D;&#x4FEE;&#x6539;&#x3000;&#x2013; <code>gitbook serve</code> &#x9884;&#x89C8; &#x2013; <code>git add .</code> &#x53CA;<code>git commit -m &quot;msg&quot;</code> &#x63D0;&#x4EA4; &#x2013; <code>git push &#x63A8;&#x9001;</code> </p>
<p><br></p>
<h3 id="5-&#x7F16;&#x8F91;markdown&#x8BED;&#x6CD5;"><a href="#5-&#x7F16;&#x8F91;-Markdown&#x8BED;&#x6CD5;" class="headerlink" title="5. &#x7F16;&#x8F91;(Markdown&#x8BED;&#x6CD5;)"></a>5. &#x7F16;&#x8F91;(Markdown&#x8BED;&#x6CD5;)</h3><blockquote>
<p>&#x4F20;&#x9001;:<br><a href="http://toolchain.gitbook.com/syntax/markdown.html" target="_blank" rel="external">Markdown</a>    </p>
</blockquote>
<ul>
<li>&#x4EE3;&#x7801;&#x9AD8;&#x4EAE;<br>&#x6307;&#x5B9A;&#x4EE3;&#x7801;&#x8BED;&#x8A00;-&#x6DFB;&#x52A0;<code>ruby</code> &#x6307;&#x5B9A;&#x8BED;&#x8A00;&#x4E3A;ruby    <figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">```ruby</div><div class="line">require &apos;redcarpet&apos;</div><div class="line">markdown = Redcarpet.new(&quot;Hello World!&quot;)</div><div class="line">puts markdown.to_html</div><div class="line">```</div></pre></td></tr></table></figure>
</li>
</ul>
<h3 id="6-&#x751F;&#x6210;pdf-&#x6587;&#x4EF6;"><a href="#6-&#x751F;&#x6210;Pdf-&#x6587;&#x4EF6;" class="headerlink" title="6. &#x751F;&#x6210;Pdf &#x6587;&#x4EF6;"></a>6. &#x751F;&#x6210;Pdf &#x6587;&#x4EF6;</h3><ol>
<li>&#x5B89;&#x88C5; calibre<br>&#x4E0B;&#x8F7D;&#xFF1A;<a href="http://calibre-ebook.com/download" target="_blank" rel="external">calibre&#x4E0B;&#x8F7D;&#x9875;&#x9762;</a>    </li>
<li><code>gitbook pdf . output.pdf</code><br>&#x5982;&#x679C;&#x5931;&#x8D25;&#xFF0C;&#x5220;&#x9664;book.json &#x6587;&#x4EF6;    <blockquote>
<p>&#x53C2;&#x8003;: <a href="http://toolchain.gitbook.com/ebook.html" target="_blank" rel="external">http://toolchain.gitbook.com/ebook.html</a></p>
</blockquote>
</li>
</ol>
<h3 id="&#x53C2;&#x8003;"><a href="#&#x53C2;&#x8003;" class="headerlink" title="&#x53C2;&#x8003;"></a>&#x53C2;&#x8003;</h3><p><a href="http://toolchain.gitbook.com/setup.html" target="_blank" rel="external">gitbook &#x5B89;&#x88C5;&#x914D;&#x7F6E;&#x5B98;&#x65B9;&#x6587;&#x6863;</a></p>

    
  </div>
</article>

</div>


  <div class="text-center donation">
    <div class="inner-donation">
      <span class="btn-donation">支持一下</span>
      <div class="donation-body">
        <div class="tip text-center">扫一扫，支持HanlyJiang</div>
        <ul class="theme.donation.items.length">
        
          <li class="item">
            <img src="/images/qr-wechat.png" alt="">
          </li>
        
          <li class="item">
            <img src="/images/qr_zhifubao.jpg" alt="">
          </li>
        
        </ul>
      </div>
    </div>
  </div>




  <a id="backTop" class="back-top">
    <i class="icon-angle-up"></i>
  </a>




  <div class="modal" id="modal">
  <span id="cover" class="cover hide"></span>
  <div id="modal-dialog" class="modal-dialog hide-dialog">
    <div class="modal-header">
      <span id="close" class="btn-close">关闭</span>
    </div>
    <hr>
    <div class="modal-body">
      <ul class="list-toolbox">
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/archives/"
              rel="noopener noreferrer"
              target="_self"
              >
              博客
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/category/"
              rel="noopener noreferrer"
              target="_self"
              >
              分类
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/tag/"
              rel="noopener noreferrer"
              target="_self"
              >
              标签
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/about/"
              rel="noopener noreferrer"
              target="_self"
              >
              关于
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/atom.xml"
              rel="noopener noreferrer"
              target="_blank"
              >
              RSS
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/search/"
              rel="noopener noreferrer"
              target="_self"
              >
              搜索
            </a>
          </li>
        
      </ul>

    </div>
  </div>
</div>



  
      <div class="fexo-comments comments-post">
    
  <section class="disqus-comments">
    <div id="disqus_thread">
      <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    </div>
  </section>

  <script>
    var disqus_shortname = 'forsigner';
    
    var disqus_url = 'http://hanlyjiang.github.io/2016/08/19/gitbook使用笔记/';
    
    (function(){
      var dsq = document.createElement('script');
      dsq.type = 'text/javascript';
      dsq.async = true;
      dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
  </script>

  <script id="dsq-count-scr" src="//forsigner.disqus.com/count.js" async></script>



    




  </div>

  

  <script type="text/javascript">
  function loadScript(url, callback) {
    var script = document.createElement('script')
    script.type = 'text/javascript';

    if (script.readyState) { //IE
      script.onreadystatechange = function() {
        if (script.readyState == 'loaded' ||
          script.readyState == 'complete') {
          script.onreadystatechange = null;
          callback();
        }
      };
    } else { //Others
      script.onload = function() {
        callback();
      };
    }

    script.src = url;
    document.getElementsByTagName('head')[0].appendChild(script);
  }

  window.onload = function() {
    loadScript('/js/bundle.js?235683', function() {
      // load success
    });
  }
</script>

</body>
</html>
